package com.zyz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @Author Serendipity
 * @Date 2022/2/27 09:35
 * @Version 1.0
 */
@Controller
public class SystemController {
//    前端跳转
    @RequestMapping("/system/jumpUserIndex")
    public String JumpUserIndex(){
        return "indexUser";
    }
    @RequestMapping("/system/jumpAdminIndex")
    public  String JumpAdminIndex(){
        return "indexAdmin";
    }
//    请求退出
    @RequestMapping("/logout")
    public String logout(HttpServletRequest request){
        HttpSession session =request.getSession();
        session.removeAttribute("userInfo");
        return "index";
    }
    @RequestMapping("/logoutIndex")
    public String logoutIndex(){
        return "index";
    }
    @RequestMapping("/system/jumpUserInfoIndex")
    public String jumpUserInfo(){
        return "userInfo";
    }
    @RequestMapping("/system/jumpInfoShowIndex")
    public String jumpInfoShow(){
        return "infoShow";
    }
    @RequestMapping("/system/jumpBookIndex")
    public String jumpBookIndex(){
        return "bookIndex";
    }
    @RequestMapping("/system/jumpCoachIndex")
    public String jumpCoachIndex(){
        return "coachIndex";
    }
    @RequestMapping("/system/jumpVipIndex")
    public String jumpVipIndex(){
        return "vipIndex";
    }

    @RequestMapping("/system/jumpNewCoachIndex")
    public String jumpNewCoachIndex() {
        return "newCoachIndex";
    }

    @RequestMapping("/system/jumpCourseIndex")
    public String jumpCourseIndex() {
        return "courseIndex";
    }
}
